<template>
    <div class="helloworld">
        <div style="position: fixed;top: 0;left: 0;">
            <button @click="btn">测试</button>
        </div>
        <div id="map"></div>
    </div>
</template>

<script>

import {SceneView} from '../../packages/view/SceneView'
import {Map} from '../../packages/map/Map'
import {TileLayer} from '../../packages/layers/TileLayer'

export default {
  name: 'test',
  components: {},
  data () {
    return {}
  },
  props: {},
  methods: {
    btn () {
      console.log(this.view._cameraControls)
    }
  },
  computed: {},
  mounted () {
    let map = new Map()
    let view = new SceneView({
      container: 'map',
      map: map
    })
    let layer = new TileLayer({
      url: 'http://map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer'
    })
    map.add(layer)
    console.log(map, view)
    this.map = map
    this.view = view
  },
  destroyed () {

  }
}
</script>

<style>
    .helloworld {
        width: 100%;
        height: 100%;
    }

    #map {
        width: 100%;
        height: 100%;
    }
</style>
